package DBLayer;

import static org.junit.Assert.*;

import java.util.ArrayList;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import ModelLayer.Person;

public class DBPersonTest {
	private IFDBPerson dbPerson;
	
	@Before
	public void setUp() throws Exception {
		dbPerson = new DBPerson();
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testGetCustomersByPhone() {
		try
		{
			ArrayList<Person> persons = dbPerson.getCustomersByPhone("12345672");
			
			if(persons != null)
			{
				for(Person person : persons)
				{
					System.out.println(person.getFirstName() + " " + person.getLastName());
				}
			}
		}
		catch(Exception err)
		{
			fail("Not yet implemented");
		}
	}

}
